/**
 * This file is part of the dspace-poltman project http://www.poltman.com.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of DuraSpace DSpace license detailed in the LICENSE and NOTICE 
 * files at the root of the source tree and available online at
 * http://www.dspace.org/license/
 * 
 */

package com.poltman.dscentral.login;


import org.apache.log4j.Logger;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zul.Window;

/**
 * 
 * @author Zbigniew Ciok; z.ciok@poltman.com
 * @version $Revision: 1439 $
 *   
 * 
 */
public class LogoutWinComposer extends SelectorComposer<Component> {

	private static final long serialVersionUID = -586825452857236903L;

	private static Logger log = Logger.getLogger(LogoutWinComposer.class);
	

    @Listen("onClick = #logoutItem")
    public void showModal(Event e) {
        Component comp = Executions.createComponents("/pages/login/logout.zul", null, null);
         
        if(comp instanceof Window) {
            ((Window)comp).doModal();
        }
    }
}

